import { defineStore } from 'pinia';

export const useBreadcrumbsStore = defineStore('breadcrumbs', {
  state: () => ({
    items: [], // 面包屑项的数组
  }),
  actions: {
    setBreadcrumbs(breadcrumbs) {
      this.items = breadcrumbs;
    },
    clearBreadcrumbs() {
      this.items = [];
    },
  },
});

export default useBreadcrumbsStore;
